<%-- 
    Document   : pageman
    Created on : 2008-10-26, 16:55:44
    Author     : Tracy
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="utility jsp snippet for paged display">

<script language="JavaScript">
function Jumping(){
  document.PageForm.submit();
  return ;
}
function gotoPage(pagenum){
  document.PageForm.jumpPage.value = pagenum;
  document.PageForm.submit();
  return ;
}
</script>
</head>

<%=pageCtl.rowsPerPage%> records per page,
totally <%=pageCtl.maxRowCount%> records,
current page <%=pageCtl.curPage%>,
totally <%=pageCtl.maxPage%> pages
<BR>
<%if(pageCtl.curPage==1){ out.print(" First Page Previous Page");   }else{  %>
<A HREF="javascript:gotoPage(1)">First Page</A>
<A HREF="javascript:gotoPage(<%=pageCtl.curPage-1%>)">Previous Page</A>
<%}%>
<%if(pageCtl.curPage==pageCtl.maxPage){ out.print("Next Page Last Page");   }else{  %>
<A HREF="javascript:gotoPage(<%=pageCtl.curPage+1%>)">Next Page</A>
<A HREF="javascript:gotoPage(<%=pageCtl.maxPage%>)">Last Page</A>
<%}%>
Jump to page <SELECT name="jumpPage" onChange="Jumping()">
     <% for(int i=1;i<=pageCtl.maxPage;i++)  {
     if (i == pageCtl.curPage){
     %>
     <OPTION selected value=<%=i%>><%=i%></OPTION>
     <%}else{%>
     <OPTION value=<%=i%>><%=i%></OPTION>
     <%}}%>
     </SELECT>
</html>
